home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / misc / gs261src.zip / msc.mak < prev    next >
Text File  |  1993-05-16  |  7KB  |  269 lines

  1. #    Copyright (C) 1991, 1992 Aladdin Enterprises.  All rights reserved.
  2. #
  3. # This file is part of Ghostscript.
  4. #
  5. # Ghostscript is distributed in the hope that it will be useful, but
  6. # WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  7. # to anyone for the consequences of using it or for whether it serves any
  8. # particular purpose or works at all, unless he says so in writing.  Refer
  9. # to the Ghostscript General Public License for full details.
  10. #
  11. # Everyone is granted permission to copy, modify and redistribute
  12. # Ghostscript, but only under the conditions described in the Ghostscript
  13. # General Public License.  A copy of this license is supposed to have been
  14. # given to you along with Ghostscript so you can know your rights and
  15. # responsibilities.  It should be in a file named COPYING.  Among other
  16. # things, the copyright notice and this notice must be preserved on all
  17. # copies.
  18.  
  19. # makefile for Ghostscript, MS-DOS MSC 7.0 platform.
  20. # Thanks to Phil Conrad and Thomas Hiller for earlier versions of this file.
  21.  
  22. # NOTE: Do NOT compile iscan.c or gdevpcfb.c with optimization.
  23.  
  24. # ------------------------------- Options ------------------------------- #
  25.  
  26. ###### This section is the only part of the file you should need to edit.
  27.  
  28. # ------ Generic options ------ #
  29.  
  30. # Define the default directory/ies for the runtime
  31. # initialization and font files.  Separate multiple directories with \;.
  32. # Use / to indicate directories, not a single \.
  33.  
  34. GS_LIB_DEFAULT=c:/gs\;c:/gs/fonts
  35.  
  36. # Define the name of the Ghostscript initialization file.
  37. # (There is no reason to change this.)
  38.  
  39. GS_INIT=gs_init.ps
  40.  
  41. # Choose generic configuration options.
  42.  
  43. # Setting DEBUG=1 includes debugging features (-Z switch) in the code.
  44. # Code runs substantially slower even if no debugging switches are set,
  45. # and also takes about another 25K of memory.
  46.  
  47. DEBUG=0
  48.  
  49. # Setting TDEBUG=1 includes symbol table information for the debugger,
  50. # and also enables stack checking.  Code is substantially slower and larger.
  51.  
  52. TDEBUG=0
  53.  
  54. # Setting NOPRIVATE=1 makes private (static) procedures and variables public,
  55. # so they are visible to the debugger and profiler.
  56. # No execution time or space penalty, just larger .OBJ and .EXE files.
  57.  
  58. NOPRIVATE=0
  59.  
  60. # Define the name of the executable file.
  61.  
  62. GS=gs
  63.  
  64. # ------ Platform-specific options ------ #
  65.  
  66. # Define the drive, directory, and compiler name for the Microsoft C files.
  67. # COMP is the full compiler path name (normally \msc\bin\wcc386p).
  68. # LINK is the full linker path name (normally \msc\bin\link).
  69. # CLINK is the compile-and-link utility full path name (normally
  70. #   \msc\bin\link).
  71. # INCDIR contains the include files (normally \msc\include).
  72. # LIBDIR contains the library files (normally \msc\lib).
  73. # Note that INCDIR and LIBDIR are always followed by a \,
  74. #   so if you want to use the current directory, use an explicit '.'.
  75.  
  76. COMP=\msc\bin\cl
  77. LINK=\msc\bin\link /NOI /BATCH /CPARMAX:1 /ONERROR:NOEXE
  78. CLINK=\msc\bin\cl /batch
  79. INCDIR=\msc\include
  80. LIBDIR=\msc\lib
  81.  
  82. # Define the processor (CPU) type.  Currently the only acceptable value
  83. # is 286.  (386 and 486 should be supported, but MSC apparently doesn't
  84. # provide any way to generate 16-bit code if you tell it you have a
  85. # 32-bit processor.)
  86.  
  87. CPU_TYPE=286
  88.  
  89. # Define the math coprocessor (FPU) type.
  90. # Options are -1 (optimize for no FPU), 0 (optimize for FPU present,
  91. # but do not require a FPU), 87, 287, or 387.
  92. # If the CPU type is 486, the FPU type is irrelevant, since the 80486
  93. # CPU includes the equivalent of an 80387 on-chip.
  94. # An xx87 option means that the executable will run only if a FPU
  95. # of that type (or higher) is available: this is NOT currently checked
  96. # at runtime.
  97.  
  98. FPU_TYPE=0
  99.  
  100. # ---------------------------- End of options ---------------------------- #
  101.  
  102. # Define the platform name.
  103.  
  104. PLATFORM=msc_
  105.  
  106. # Define the name of the makefile -- used in dependencies.
  107.  
  108. #MAKEFILE=msc.mak
  109. MAKEFILE=makefile
  110.  
  111. # Define the ANSI-to-K&R dependency.  Microsoft C accepts ANSI syntax,
  112. # but we need to preconstruct ccf.tr to get around the limit on
  113. # the maximum length of a command line.
  114.  
  115. AK=ccf.tr
  116.  
  117. # Define the extensions for the object and executable files.
  118.  
  119. OBJ=obj
  120. XE=.exe
  121.  
  122. # Define the current directory prefix, shell quote string, and shell name.
  123.  
  124. EXPP=
  125. QQ="\"
  126. SH=
  127. SHP=
  128.  
  129. # Define the generic compilation flags.
  130.  
  131. PLATOPT=
  132.  
  133. INTASM=
  134. PCFBASM=
  135.  
  136. # Define the generic compilation rules.
  137.  
  138. .asm.obj:
  139.     $(ASM) $(ASMFLAGS) $<;
  140.  
  141. # Make sure we get the right default target for make.
  142.  
  143. all: gs$(XE)
  144.  
  145. # Define the compilation flags.
  146.  
  147. !if $(CPU_TYPE)>400
  148. CPFLAGS=/G4
  149. !else if $(CPU_TYPE)>300
  150. CPFLAGS=/G3
  151. !else if $(CPU_TYPE)>200
  152. CPFLAGS=/G2
  153. !else if $(CPU_TYPE)>100
  154. CPFLAGS=/G1
  155. !else
  156. CPFLAGS=/G0
  157. !endif
  158.  
  159. !if $(CPU_TYPE)==486 || $(FPU_TYPE)>0
  160. FPFLAGS=/FPi87
  161. !else
  162. FPFLAGS=/FPi
  163. !endif
  164.  
  165. !if $(NOPRIVATE)!=0
  166. CP=/DNOPRIVATE
  167. !else
  168. CP=
  169. !endif
  170.  
  171. !if $(DEBUG)!=0
  172. CD=/DDEBUG /Gt128
  173. !else
  174. CD=
  175. !endif
  176.  
  177. !if $(TDEBUG)!=0
  178. CT=/f /Zi /Od
  179. LCT=/CO /FAR /PACKC
  180. !else
  181. CT=
  182. #CT=/f- /Ot /Oi /Ol /Oe /Og /Gs
  183. LCT=/EXE /FAR /PACKC
  184. !endif
  185.  
  186. !if $(DEBUG)!=0 || $(TDEBUG)!=0
  187. CS=/Ge
  188. !else
  189. CS=/Gs
  190. !endif
  191.  
  192. GENOPT=$(CP) $(CD) $(CT) $(CS) /AL /W2 /batch /nologo
  193.  
  194. CCFLAGS=$(PLATOPT) $(FPFLAGS) $(CPFLAGS)
  195. CC=$(COMP) /c $(CCFLAGS) @ccf.tr
  196. CCL=$(CLINK)
  197. CCC=$(CC) /Za
  198. CCD=$(CC)
  199. CCINT=$(CC) /Za
  200.  
  201. .c.obj:
  202.     $(CCC) $<
  203.  
  204. # Define the files to be removed by `make clean'.
  205. # nmake expands macros when encountered, not when used,
  206. # so this must precede the !include statements.
  207.  
  208. BEGINFILES=ccf.tr
  209.  
  210. # -------------------------- Auxiliary programs --------------------------- #
  211.  
  212. ccf.tr: $(MAKEFILE)
  213.     echo $(GENOPT) /I$(INCDIR) >ccf.tr
  214.  
  215. echogs$(XE): echogs.c
  216.     $(CCL) $(CCFLAGS) echogs.c
  217.  
  218. genarch$(XE): genarch.c
  219.     $(CCL) $(CCFLAGS) genarch.c
  220.  
  221. genconf$(XE): genconf.c
  222.     $(CCL) $(CCFLAGS) genconf.c
  223.  
  224. # ------ Devices and features ------ #
  225.  
  226. # Choose the language feature(s) to include.  See gs.mak for details.
  227. # Since we have a large address space, we include the optional features.
  228.  
  229. FEATURE_DEVS=filter.dev
  230.  
  231. # Choose the device(s) to include.  See devs.mak for details.
  232.  
  233. DEVICE_DEVS=vga.dev ega.dev
  234. DEVICE_DEVS2=atiw.dev s3vga.dev tseng.dev tvga.dev
  235. DEVICE_DEVS3=deskjet.dev djet500.dev laserjet.dev ljetplus.dev ljet2p.dev ljet3.dev
  236. DEVICE_DEVS4=cdeskjet.dev cdjcolor.dev cdjmono.dev cdj550.dev paintjet.dev pjetxl.dev
  237. DEVICE_DEVS5=epson.dev eps9high.dev ibmpro.dev bj10e.dev
  238. DEVICE_DEVS8=gifmono.dev gif8.dev pcxmono.dev pcx16.dev pcx256.dev
  239. !include gs.mak
  240. !include devs.mak
  241.  
  242. # -------------------------------- Library -------------------------------- #
  243.  
  244. # The Microsoft C platform
  245.  
  246. # Eventually we need a gp_imsc.$(OBJ)....
  247. msc__=gp_iwatc.$(OBJ) gp_dosfb.$(OBJ) gp_msdos.$(OBJ)
  248. msc_.dev: $(msc__)
  249.     $(SHP)gssetmod msc_ $(msc__)
  250.  
  251. gp_iwatc.$(OBJ): gp_iwatc.c $(string__h) $(gx_h) $(gp_h)
  252.  
  253. gp_dosfb.$(OBJ): gp_dosfb.c $(memory__h) $(gx_h) $(gp_h) $(gserrors_h) $(gxdevice_h)
  254.  
  255. gp_msdos.$(OBJ): gp_msdos.c $(dos__h) $(string__h) $(gx_h) $(gp_h)
  256.  
  257. # ----------------------------- Main program ------------------------------ #
  258.  
  259. CCBEGIN=$(CCC) *.c
  260.  
  261. LIBDOS=$(LIBGS) obj.tr
  262.  
  263. # Interpreter main program
  264.  
  265. GS_ALL=gs.$(OBJ) $(INT) $(INTASM) gsmain.$(OBJ) $(LIBDOS) obj.tr lib.tr
  266.  
  267. $(GS)$(XE): $(GS_ALL) $(ALL_DEVS)
  268.     $(LINK) /SEG:256 /STACK:8192 $(LCT) @gs.tr @obj.tr ,,$(GS),$(GS); 
  269.